Method: IO#<<

Defined in:
io.c

#<<(obj) ⇒ IO

String Output—Writes obj to ios. obj will be converted to a string using to_s.

$stdout << "Hello " << "world!\n"

produces:

Hello world!

Returns:

[View source]

1991
1992
1993
1994
1995
1996
# File 'io.c', line 1991

VALUE
rb_io_addstr(VALUE io, VALUE str)
{
    rb_io_write(io, str);
    return io;
}